package com.sky.task;


import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component//定时任务测试
public class DemoTask {

    //@Scheduled(cron = "0/3 * * * * ?")//每3秒执行一次
    public void showTime(){
        System.out.println(LocalDateTime.now());
    }
}
